package cn.wolfcode.luowowo.comment.service.impl;

import cn.wolfcode.luowowo.comment.domain.UserInfoAttention;
import cn.wolfcode.luowowo.comment.repository.UserInfoAttentionRepository;
import cn.wolfcode.luowowo.comment.service.IUserInfoAttentionService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;

import java.util.List;

@Service
public class UserInfoAttentionServiceImpl implements IUserInfoAttentionService {
    @Autowired
    private UserInfoAttentionRepository repository;
    @Autowired
    private MongoTemplate template;
    //关注操作
    public UserInfoAttention save(UserInfoAttention userInfoAttention) {
        repository.save(userInfoAttention);
        return userInfoAttention;
    }

    public List<UserInfoAttention> findAllByUserId(Long id) {
        return repository.findAllByUserId(id);
    }

    public List<UserInfoAttention> findAllBybeUserId(Long id) {
        return repository.findAllByBeUserId(id);
    }

}
